[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
goto goto Statement
goto label;
The "infinitely-abusable goto statement" causes an unconditional jump
to a named label.
Notes: Any statement may have a label, however, labels are only
recognized by the goto statement. A label must be
followed by a statement, even if it is only the null
statement.
You cannot jump to a switch's `case' or `default' labels.
Statement labels within a function must be unique.
While many might consider it an unspeakably ugly
programming practice, it is possible to jump into a
compound statement or switch.
-------------------------------- Example ---------------------------------
for (i = 0; i < imax; ++i){
for (j = 0; j < jmax; ++j){
if (table[i][j] == value)
goto found;
}
}
printf("Can't find value in table\n");
return(1);
found: statement;
See Also:
label
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson